package com.albaba.designpattern.mediator.text_002;

/**
 * @Description: 具体同时类-承租人
 * @Author zx
 * @Date 2025/3/3 16:50
 * @Version 1.0
 */
public class Tenant extends Person{
    public Tenant(String name, Mediator mediator) {
        super(name, mediator);
    }

    public void contact(String msg) {
        mediator.contact(msg, this);
    }

    public void getMessage(String msg) {
        System.out.println("租房者：" + name + ",收到信息:" + msg);
    }
}
